//
//  ReaderTopBar.h
//  ebook
//
//  Created by 吴超飞 on 16/1/15.
//  Copyright © 2016年 Moton. All rights reserved.
//
#import <UIKit/UIKit.h>

@class ReaderTopBar;

@protocol ReaderTopBarDelegate <NSObject>

-(void)readerTopBar:(ReaderTopBar *)topBar backBtnClick:(id)sender;
-(void)readerTopBar:(ReaderTopBar *)topBar selectContent:(NSInteger)content;
-(void)readerTopBar:(ReaderTopBar *)topBar refreshChapterBtnclick:(UIButton *)btn;
-(void)readerTopBar:(ReaderTopBar *)topBar redirectStoreBtnclick:(UIButton *)btn;
-(void)readerTopBar:(ReaderTopBar *)topBar changeSourceBtnClick:(id)sender;
-(void)readerTopBar:(ReaderTopBar *)topBar sourceBtnClick:(id)sender;
-(void)readerTopBar:(ReaderTopBar *)topBar clickedTranscodingButtonAtIndex:(NSInteger)buttonIndex;

@end

@class ReaderBookModel;

@interface ReaderTopBar : UIView

@property (nonatomic,assign) BOOL isMarked;
@property (nonatomic,assign) BOOL isNight;
@property (nonatomic,weak) id<ReaderTopBarDelegate> delegate;
@property (nonatomic,retain) UIButton *backBtn;
@property (nonatomic,retain) UIButton *moreBtn;
@property (nonatomic,retain) UIView *topView;

-(instancetype)initWithDataController:(ReaderBookModel *)readerbookModelViewController;

-(void)addToView:(UIView *)parentView;//加入父视图，并且默认不显示
-(BOOL)isSHow;//判断当前是否显示
-(void)hide;//隐藏视图
-(void)show;//显示

-(BOOL)isShowSubView;//判断是否有二级子视图显示
-(void)hideSubView;

@end
